import React from 'react';
import { Router, Route, Switch } from 'dva/router';
import MainLayout from './routes/mainLayout';
// import DataScan from './routes/dataLuo/dataScan';
// import DataLook from './routes/dataLuo/dataLook';
import OderData from './routes/dataCenter/oderData'
import SonData from './routes/dataCenter/sonData'
import TimeLiness from './routes/dataCenter/timeLiness'
import SetOder from './routes/dataCenter/setOder'
import ReceiptRecord from './routes/dataCenter/receiptRecord'
import ParcelData from './routes/dataCenter/parcelData'
import NoOderGet from './routes/departurePort/noOderGet'
import PackStatus from './routes/departurePort/packStatus'
import WareHouse from './routes/warehouseManagement/wareHouse'
import ContractList from './routes/warehouseManagement/contractList'
import ShortMessage from './routes/serviceCenter/shortMessage'
import OperatorManage from './routes/departurePort/operatorManage'
import BoardingCardManage from './routes/departurePort/boardingCardManage'
import StorageRack from './routes/warehouseManagement/storageRack'
import StorageCheck from './routes/warehouseManagement/storageCheck'
import StorageRecord from './routes/warehouseManagement/storageRecord'
import OnHoldIn from './routes/serviceCenter/onHoldIn'
import OnHoldList from './routes/serviceCenter/onHoldList'
import NoMessage from './routes/serviceCenter/noMessage'
import ReturnGoods from './routes/serviceCenter/returnGoods'
import RefundApplication from './routes/serviceCenter/refundApplication'
import ExchangeRate from './routes/serviceCenter/exchangeRate'
import CollectionList from './routes/serviceCenter/collectionList'
import SingleTask from './routes/dataCenter/singleTask'
import CustomerManagement from './routes/marketingCenter/customerManagement'
import CustomerMarketing from './routes/marketingCenter/customerMarketing'
import CouponManagement from './routes/marketingCenter/couponManagement'
import ApplicationProcessing from './routes/marketingCenter/applicationProcessing'
import SalesReport from './routes/financialManagement/salesReport'
import PortStatement from './routes/financialManagement//portStatement'
import SalesRecord from './routes/financialManagement/salesRecord'
import SupplierManagement from './routes/financialManagement/supplierManagement'
import CostControl from './routes/financialManagement/costControl'
import CostpriceManagement from './routes/financialManagement/costpriceManagement'
import AccountEditor from './routes/myAccount/accountEditor'
import SubaccountManagement from './routes/myAccount/subaccountManagement'
import ExpressManaging from './routes/myAccount/expressManaging'
import CostAccounting from './routes/financialManagement/costAccounting'
import CostInput from './routes/financialManagement/costInput'
import WriteOff from './routes/financialManagement/writeOff'
import OtherCostdata from './routes/financialManagement/otherCostdata'
import RefundWaybill from './routes/financialManagement/refundWaybill'
import WriteoffList from './routes/financialManagement/writeoffList'
import { LocaleProvider } from 'antd';
import zh_CN from 'antd/lib/locale-provider/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
// import StorageRecord from './routes/warehouseManagement/storageRecord';

moment.locale('zh-cn');

function RouterConfig({ history }) {
  return (
    <LocaleProvider locale={zh_CN}>
    <Router history={history}>
      {/* <Switch>
        <Route path="/" exact component={mainLayout} />
      </Switch> */}
        <Route
          render={() => (<MainLayout>
            <Switch>
              {/* <Route
                component={DataScan}
                exact
                path="/dataScan"
              />
              <Route
                component={DataLook}
                exact
                path="/dataLook"
              /> */}
              <Route
                component={OderData}
                exact
                path="/oderData"
              />
              <Route
                component={SonData}
                exact
                path="/sonData"
              />
              <Route
                component={TimeLiness}
                exact
                path="/timeLiness"
              />
               <Route
                component={SetOder}
                exact
                path="/setOder"
              />
              <Route
                component={ReceiptRecord}
                exact
                path="/receiptRecord"
              />
              <Route
                component={ParcelData}
                exact
                path="/parcelData"
              />
              <Route
                component={NoOderGet}
                exact
                path="/noOderGet"
              />
               <Route
                component={PackStatus}
                exact
                path="/packStatus"
              />
              <Route
                component={WareHouse}
                exact
                path="/wareHouse"
              />
              <Route
                component={ContractList}
                exact
                path="/contractList"
              />
              <Route
                component={ShortMessage}
                exact
                path="/shortMessage"
              />
              <Route
                component={OperatorManage}
                exact
                path="/operatorManage"
              />
               <Route
                component={BoardingCardManage}
                exact
                path="/boardingCardManage"
              />
               <Route
                component={StorageRack}
                exact
                path="/storageRack"
              />
              <Route
                component={StorageCheck}
                exact
                path="/storageCheck"
              />
              <Route
                component={StorageRecord}
                exact
                path="/storageRecord"
              />
              <Route
                component={OnHoldIn}
                exact
                path="/onHoldIn"
              />
               <Route
                component={OnHoldList}
                exact
                path="/onHoldList"
              />
               <Route
                component={NoMessage}
                exact
                path="/noMessage"
              />
               <Route
                component={ReturnGoods}
                exact
                path="/returnGoods"
              />
              <Route
                component={RefundApplication}
                exact
                path="/refundApplication"
              />
              <Route
                component={ExchangeRate}
                exact
                path="/exchangeRate"
              />
              <Route
                component={CollectionList}
                exact
                path="/collectionList"
              />
              <Route
                component={SingleTask}
                exact
                path="/singleTask"
              />
               <Route
                component={CustomerManagement}
                exact
                path="/customerManagement"
              />
               <Route
                component={CustomerMarketing}
                exact
                path="/customerMarketing"
              />
              <Route
                component={CouponManagement}
                exact
                path="/couponManagement"
              />
               <Route
                component={ApplicationProcessing}
                exact
                path="/applicationProcessing"
              />
              <Route
                component={SalesReport}
                exact
                path="/salesReport"
              />
              <Route
                component={PortStatement}
                exact
                path="/portStatement"
              />
              <Route
                component={SalesRecord}
                exact
                path="/salesRecord"
              />
              <Route
                component={SupplierManagement}
                exact
                path="/supplierManagement"
              />
               <Route
                component={CostControl}
                exact
                path="/costControl"
              />
              <Route
                component={CostpriceManagement}
                exact
                path="/costpriceManagement"
              />
               <Route
                component={AccountEditor}
                exact
                path="/accountEditor"
              />
              <Route
                component={SubaccountManagement}
                exact
                path="/subaccountManagement"
              />
              <Route
                component={ExpressManaging}
                exact
                path="/expressManaging"
              />
              <Route
                component={CostAccounting}
                exact
                path="/costAccounting"
              />
              <Route
                component={CostInput}
                exact
                path="/costInput"
              />
              <Route
                component={WriteOff}
                exact
                path="/writeOff"
              />
              <Route
                component={OtherCostdata}
                exact
                path="/otherCostdata"
              />
              <Route
                component={RefundWaybill}
                exact
                path="/refundWaybill"
              />
              <Route
                component={WriteoffList}
                exact
                path="/writeoffList"
              />
            </Switch>
          </MainLayout>)}
        />
    </Router>
    </LocaleProvider>
  );
}

export default RouterConfig;
